home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Simulation / PDP-8 Simulator / Test Files / Move.src < prev    next >
Encoding:
Text File  |  1993-06-20  |  383 b   |  16 lines  |  [TEXT/KAHL]

  1. ;THis is a PDP-8 assembly language program
  2.  
  3.  
  4.             ORG        %100    ;set origin of code to zero
  5.             EQU        count    %11+%100
  6.             
  7.             CLA                ;clear accumulator
  8. LOOP:        TAD        count    ;get data into acc (added to zero)
  9.             CLL                ;clear the link bit
  10.             RTL                ;multiply acc by 2
  11.             TAD        count    ;add in original value
  12.             SNA                ;if zero, we finished
  13.             HLT
  14.             DCA        count    ;write it back
  15.             JMP        loop                    
  16.             END